/********************************************************************************
 *      Copyright:  (C) 2024 linuxer<linuxer@email.com>
 *                  All rights reserved.
 *
 *       Filename:  logger.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(19/03/24)
 *         Author:  linuxer <linuxer@email.com>
 *      ChangeLog:  1, Release initial version on "19/03/24 14:26:30"
 *                 
 ********************************************************************************/

//防止头文件重复包含
#ifndef _LOGGER_H_
#define	_LOGGER_H_

enum
{
	LOG_LEVEL_ERROR,
	LOG_LEVEL_WARN,
	LOG_LEVEL_INFO,
	LOG_LEVEL_DEBUG,
	LOG_LEVEL_MAX,
};

#define LOG_STRING_ERROR "ERROR"
#define LOG_STRING_WARN "WARN"
#define LOG_STRING_INFO	"INFO"
#define	LOG_STRING_DEBUG "DEBUG"


/*
 * logger initial and terminate functions
 */
int logger_init(char *filename,int loglevel);
void logger_term(void);

/*
 * logging methods by levels
 */
void log_error(char* format,...);
void log_warn(char* format,...);
void log_info(char* format,...);
void log_debug(char* format,...);

#endif

